package org.spbsu.apco.server.taskset.sample;

import org.spbsu.apco.common.task.impl.GenericCommunicationTask;
import org.spbsu.apco.server.taskset.BaseTaskSet;

import java.util.List;

/**
 * User: mikpan
 * Date: 4/6/13
 * Time: 7:05 PM
 */
public class CommunicationTaskSet extends BaseTaskSet {
    private int tasksPerCycle;
    private List<String> links;

    public CommunicationTaskSet(int tasksPerCycle, List<String> links) {
        this.tasksPerCycle = tasksPerCycle;
        this.links = links;
    }

    @Override
    public void initializeTasks() {
        for (int t=0; t<tasksPerCycle; t++) {
            GenericCommunicationTask task = new GenericCommunicationTask();
            addLeafTask(task, links);
        }
    }
}
